- if domain_presenter.errors.any?
  = render Pajamas::AlertComponent.new(variant: :danger, dismissible: false) do |c|
    - c.with_body do
      - domain_presenter.errors.full_messages.each do |msg|
        = msg

.form-group
  .row
    - if domain_presenter.persisted?
      .gl-col-12
        = _("Domain")
        = external_link(domain_presenter.url, domain_presenter.url)
    - else
      .gl-col-12
        = f.label :domain, _("Domain")
        .input-group
          = f.text_field :domain, required: true, autocomplete: "off", class: "form-control", placeholder: 'example.com'

- if domain_presenter.persisted?
  = render 'dns'

- if Gitlab.config.pages.external_https || Gitlab.config.pages.custom_domain_mode == 'https'
  = render 'certificate', f: f
- else
  .gl-text-subtle.gl-my-5
    = _("Support for custom certificates is disabled. Ask your system's administrator to enable it.")
